package com.air.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 航班信息
 */
@Data
public class Flight {

  private Integer id;
  private Integer aircraftsId;
  private Integer takeOffCity;
  private Integer takeOffAirport;
  private String name;

  @JsonFormat(pattern="yyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  @JSONField(format = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date takeOffTime;
  private Integer landingCity;
  private Integer landingAirport;

  @JsonFormat(pattern="yyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  @JSONField(format = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date landingTime;

  private Aircrafts aircrafts;
  private Airport takeOffAirportE;
  private Airport landingAirportE;

  private City takeOffCityE;
  private City landingCityE;

  private Integer economyClass;
  private Integer economyClassSize;
  private Integer firstClass;
  private Integer firstClassSize;
}
